Repository navigation
ci: publish crate with trusted publishing - #171
Merged
Merged
Conversation
Publish foundryup from release.yml after the GitHub release is created, so crates.io can trust that workflow.
DaniPopes
marked this pull request as ready for review
November 20, 2026 14:20
DaniPopes
requested review from
0xrusowsky,
grandizzy,
mattsse and
onbjerg
as code owners
November 20, 2026 14:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publish the
foundryupcrate to crates.io fromrelease.ymlwith trusted publishing, so releases no longer need a hand-runcargo publish. The build and release jobs are unchanged.Two jobs follow the existing ones.
verifyhas no environment and itsid-tokenis for the secure runner only. It checks that the tagged commit is onmasterand that the tag matches the version inCargo.toml, then dry-runs the publish without crates.io access.publishruns in thereleaseenvironment, re-checks the tag, and uploads withtempoxyz/gh-actions/actions/cargo-publish(verify: false, so no build script runs while crates.io trusts the job). A version already on crates.io is skipped, so a failed run can be rerun.publishwaits for thereleasejob, so a failed binary build stops the release before the crate uploads. The GitHub release does not wait on crates.io, becausefoundryupself-updates from GitHub releases. Both new jobs skip prerelease tags such asv2.0.0-rc1, whoseCargo.tomlversion does not match the tag. crates.io's latest version is 0.0.9, so the next release tag,v2.0.0or a later one, publishes theCargo.tomlversion as the first version from CI.The README does not tell anyone to publish by hand, so it is unchanged.
One-time setup, already done outside this PR: a GitHub environment
releaselimited tov*tags, areleasetag ruleset onrefs/tags/v*, and this crates.io trusted publisher:foundryupfoundry-rsfoundryuprelease.ymlrelease